/*************************************************
 * File:    		main.cpp
 * Author:  	HouJiong <hou_jiong@163.com>
 * Brief:   		StoneMoneky project.
 *
 * Copyright (c) HouJiong
 *
 *************************************************/

/*
 * History:
 * =======================================
 * 2009-04-10 HouJiong <hou_jiong@163.com> created
 */
 
#include <qapplication.h>
#include "SMFactory.h"
#include "SMtypedef.h"
#include "SMJS.h"

static void writeStr()
{
	DEBUG_LINE();
	std::ifstream file2("pdos.def");
	
	file2<<"I Love You";
    file2.close(); 

}

int main(int argc, char **argv)
{

	QApplication a( argc, argv );
	SMFactory *factory=new SMFactory();	

	SMXMLDOM *dom=SMFactory::instance()->getSMXMLDOM();
	dom->loadXML("example.xml");	
	
	SMJS *js=new SMJS();
	js->loadJS("a.js");
	
	SMView *v=SMFactory::instance()->getview();
	v->loadXML(dom);
	v->loadJS(js);	
	v->show();

	writeStr();
	

	return a.exec();
}
